package com.qf.six.ssm.controller.admin;

import com.qf.six.ssm.commen.request.UserParam;
import com.qf.six.ssm.commen.vo.ResponseCode;
import com.qf.six.ssm.commen.vo.ResponseResult;
import com.qf.six.ssm.service.admin.UserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author ZL
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Resource
    UserService userService;
    //登录
    @RequestMapping("/login")
    public ResponseResult<Object> login(UserParam param){
        return  userService.selectUser(param);
    }
    //注册
    @RequestMapping("/register")
    public ResponseResult<Object> register(UserParam param){
        return userService.insertUser(param);
    }
}
